﻿<%@ Page Language="C#" MasterPageFile="~/Administrator/Admin.master" AutoEventWireup="true" Inherits="Administrator_AdminCompanyImages"
    Title="Quản lý hình ảnh công ty" Codebehind="AdminCompanyImages.aspx.cs" %>

<%@ Register Src="~/Administrator/Controls/PaggingControl.ascx" TagName="PaggingControl"
    TagPrefix="EHT" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h1>
        <asp:Label ID="lbAdminCompanyImages" runat="server" Text="Hình ảnh công ty"></asp:Label>
    </h1>
    <p class="submitButton">
        <asp:Button ID="btnAdd" runat="server" Text="Thêm mới hình ảnh" CssClass="btn_action" 
            onclick="btnAdd_Click" />
    </p>
    <asp:Repeater ID="rpHinhAnhs" runat="server" 
        onitemcommand="rpHinhAnhs_ItemCommand">
        <HeaderTemplate>
            <table cellspacing="0" cellpadding="0" class="data-table">
                <thead>
                    <tr>
                        <th class="actions delete">
                            STT
                        </th>
                        <th class="actions edit">
                            Sửa
                        </th>
                        <th class="actions delete">
                            Xóa
                        </th>
                         <th>
                            Ảnh
                        </th>
                        <th>
                            Mô tả VN
                        </th>
                        <th class="OtherLanguage">
                            Mô tả Other
                        </th>
                       
                        <th  class="number_of_order">
                            Thứ tự
                            <asp:ImageButton ID="ibtnSaveAll" ImageUrl="Templates/Images/save_all.jpg" Height="20"
                                Width="20" OnClientClick="return confirm('Bạn muốn lưu ?');" runat="server" BorderStyle="None"
                                CommandName="save_all" />
                        </th>
                        <th class="publish">
                            Hiển thị
                        </th>
                    </tr>
                </thead>
                <tbody>
        </HeaderTemplate>
        <ItemTemplate>
             <td>
                    <%#Eval("IndexId")%>
                </td>
                <td class="actions edit">
                    <a href='AdminCompanyImageIU.aspx?HinhAnhID=<%#Eval("HinhAnhID")%>'>
                        <img alt="Edit" src="Templates/Images/Edit.png" style="border: none;"></a>
                    <asp:Literal ID="ltrHinhAnhID" runat="server" Visible="false" Text='<%#Eval("HinhAnhID")%>'></asp:Literal>
                </td>
                <td class="actions delete">
                    <asp:ImageButton ID="ibtn" ImageUrl="Templates/Images/Delete.png" OnClientClick="return confirm('Bạn muốn xóa Hình ảnh ?');"
                        runat="server" CommandName="delete1" CommandArgument='<%#Eval("HinhAnhID") %>'
                        BorderStyle="None" />
                </td>
                
                <td>
                  <img height="100" width="100" src='../ImageDatas/CompanyImages/<%#Eval("HinhAnhUrl")%>' alt="" />
                </td>
                <th>
                    <%#Eval("MoTaVN") %>
                </th>
                <th class="OtherLanguage">
                    <%#Eval("MoTaOther") %>
                </th>
                <td>
                    <asp:TextBox ID="txtNumberOfOrder" Width="30" runat="server" Text='<%#Eval("NumberOfOrder")%>'></asp:TextBox>
                    <asp:ImageButton Width="16" Height="16" ID="btnSaveNumberOfOrder" CommandName="change_number_of_order"
                        CommandArgument='<%#Eval("HinhAnhID") %>' ImageUrl="Templates/Images/save.jpg"
                        runat="server" />
                    </td>
                    <td>
                        <asp:CheckBox ID="ckPublish" runat="server" Checked='<%#Eval("Publish")%>' Visible="false" />
                        <asp:ImageButton Width="16" Height="16" ID="btnPublish" CommandName="publish" CommandArgument='<%#Eval("HinhAnhID") %>'
                            ImageUrl="Templates/Images/btncheck.png" runat="server" />
                    </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </tbody> </table>
        </FooterTemplate>
    </asp:Repeater>
     <p>
        <EHT:PaggingControl ID="PaggingControl1" runat="server" PageURL="AdminBanners.aspx"
            PageSize="10" />
    </p>
    
</asp:Content>
